# -*- coding:utf-8 -*-
from fastapi import Request
from core.curd import IBaseService
from app.dao.system import SysMenuDao

class SysMenuService(IBaseService):

    async def get_menu_tree(self):
        return await self.dao.get_menu_tree()

    @classmethod
    async def instance(cls, req: Request):
        inst = cls()
        inst.dao = await SysMenuDao.instance(req)
        return inst
